#include<iostream>
#include<vector>
#include<string>
using namespace std;
vector<string>ans;
string s;
int main()
{
    getline(cin,s);
	s+=" ";
	bool flag=0;
	string temp;
	for(int i=0;i<s.size();i++){
		if(s[i]==' '&&!flag){
			ans.push_back(temp);
			temp="";
		}
		else if(s[i]=='"'){
            if(!flag) flag=1;
			else flag=0;
		}
		else temp+=s[i];
	}
	cout<<ans.size()<<endl;
	for(auto x:ans){
		cout<<x<<endl;
	}
	/*
	string s;
	while(cin>>s){
		ans.push_back(s);
	}
	cout<<ans.size()<<endl;
	for(auto x:ans{
		if(x[0]=='"'){
		   string temp;
		   for(int i=1;i<x.size()-1;i++){
		      temp+=x[i];
		   }
		   cout<<temp<<endl;
		   continue;
		}
		cout<<x<<endl;
	}*/
	return 0;
}
